<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<script language="javascript">
	function checkForm() {
		var categoryId = document.getElementById("categoryId").value;
		var content = document.getElementById("content").value;
		var proportion = document.getElementById("proportion").value;

		if (categoryId == 0) {
			alert("请选择所属模块！");
			return false;
		}
		if (content == null || content == "") {
			alert("请输入指标内容！");
			return false;
		}
		if (proportion == 0 || proportion == "") {
			alert("请输入权重！");
			return false;
		}
	}
</script>

<style type="text/css">
<!--
.STYLE1 {
	font-size: 12px
}

.STYLE3 {
	color: #707070;
	font-size: 12px;
}

.STYLE5 {
	color: #0a6e0c;
	font-size: 12px;
}

body {
	margin-top: 0px;
	margin-bottom: 0px;
}

.STYLE7 {
	font-size: 12
}
-->
</style>
<html:form action="item.do?method=save" method="post"
	onsubmit="return checkForm();">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td height="30">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td>&nbsp;</td>
					<td style="padding-right: 10px;">
					<div align="right"></div>
					</td>
				</tr>
			</table>
			</td>
		</tr>
		<tr>
			<td>
			<table width="100%" border="0" cellpadding="0" cellspacing="1"
				bgcolor="#c9c9c9">
				<tr>
					<td width="70%" height="22" bgcolor="#FFFFFF"><strong><span
						class="STYLE1">增加评价表项</span></strong></td>
				</tr>
				<tr>
					<td bgcolor="#FFFFFF">
					<table width="700" border="0" align="center" cellpadding="0"
						cellspacing="0">
						<tr>
							<td align="right">所属模块：</td>
							<td><html:select property="categoryId">
								<html:option value="0">请选择</html:option>
								<c:if test="${!empty categoryList}">
									<c:forEach items="${categoryList}" var="category">
										<html:option value="${category.id}">${category.name}</html:option>
									</c:forEach>
								</c:if>
							</html:select><font color="red">${categoryIdRequired }</font></td>
						</tr>
						<tr>
							<td align="right">指标内容：</td>
							<td><html:textarea property="content"  cols="45"
								rows="5" /><font color="red">${contentRequired }</font></td>
						</tr>
						<tr>
							<td align="right">权 重：</td>
							<td><html:text property="proportion"  /><font color="red">${proportionRequired }</font></td>
						</tr>
						<tr>
							<td>&nbsp;</td>
							<td>&nbsp;</td>
						</tr>
						<tr>
							<td align="center">&nbsp;</td>
							<td><html:submit value="确认增加" /> &nbsp;&nbsp;&nbsp; <html:reset
								value="取 消" /></td>
						</tr>
					</table>					</td>
				</tr>
			</table>
		  </td>
		</tr>
		<tr>
			<td height="35">&nbsp;</td>
		</tr>
	</table>
</html:form>